Skip to content

fix(ai-chat): insert generated SQL into a new query tab instead of appending#1428

Merged
datlechin merged 1 commit into
mainfrom
fix/1257-ai-insert-new-tab
May 27, 2026
Merged

fix(ai-chat): insert generated SQL into a new query tab instead of appending#1428
datlechin merged 1 commit into
mainfrom
fix/1257-ai-insert-new-tab

Conversation

@datlechin
Copy link
Copy Markdown
Member

Closes #1257.

Clicking Insert on an AI Chat code block appended the SQL to the current query, mixing old and new SQL so a result could not be traced to a query.

Changes

  • Insert now fills the editor only when the selected query tab is empty. Otherwise it opens the SQL in a new query tab, made active, so each AI query gets its own tab and result grid.

Tests

AIChatInsertQueryTests covers the empty-tab fill, the no-tabs case, and the decision to open a new tab when the current query tab already has content.

@datlechin datlechin merged commit 3ab1297 into main May 27, 2026
2 checks passed
@datlechin datlechin deleted the fix/1257-ai-insert-new-tab branch May 27, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Delete previous query when inserting from AI Chat

1 participant